{% extends "lxoa/layout.html" %}
{% block css %}

{% endblock %}
{% block content %}
<link rel="stylesheet" type="text/css" href="/static/lxoa/css/bootstrap-table.min.css" />
<style>
    .input-group {
        width: 100%;
    }

    .input-group-addon {
        width: 120px;
    }
    .selectpicker {
        width: 100%;
        /*height: 34px;*/
    }
    .input-group-addon2 {
        background-color: #fff;
        border: 0px;
    }
</style>
<div class="panel-body" style="margin-top:8px;">
    <!-- Table -->
    <table id="table"></table>


    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <h4 class="modal-title" id="myModalLabel">报销审批</h4>
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                </div>
                <div class="modal-body">
                    <div id="myAlert" class="alert alert-success hidden" style="">
                        <!--<a href="#" class="close" data-dismiss="alert">&times;</a>-->
                        <strong>提交成功！</strong>
                    </div>

                    <div id="myAlerterror" class="alert alert-warning hidden" style="">
                        <!--<a href="#" class="close" data-dismiss="alert">&times;</a>-->
                        <strong>提交失败，请稍后重试！</strong>
                    </div>

                    <div class="panel-body">
                        <div class="row">
                            <style>
                                .input-group div {
                                    padding-left: 10px;
                                    /*padding-top: 8px;*/
                                }
                            </style>
                            <div class="col-md-6 margin-top-8">
                                <div class="input-group">
                                    <span class="input-group-addon2" id="">报销类型</span>
                                    <div id="divtype">
                                    </div>

                                </div>
                            </div>
                            <!--<div class="col-md-6 margin-top-8">
                            <div class="input-group">
                                <span class="input-group-addon" id="">confirm person</span>
                                <select class="selectpicker" name="vac_person2" id="vac_person2" data-style="btn-info">
                                    <option value="Mime Li">Mime Li</option>
                                    <option value="David Tang">David Tang</option>
                                    <option value="Daisy Zhu">Daisy Zhu</option>
                                    <option value="Kyle Bie">Kyle Bie</option>
                                    <option value="Cherry Wu">Cherry Wu</option>
                                    <option value="Alison Zhang">Alison Zhang</option>
                                </select>
                            </div>
                        </div>-->

                            <div class="col-md-6 margin-top-8">
                                <div class="input-group">
                                    <span class="input-group-addon2" id="">审批人</span>
                                    <div id="divapprover">
                                    </div>
                                    <div id="divapproveremail" style="display:none;">
                                    </div>
                                </div>
                            </div>

                        </div>
                        <div class="row">

                            <div class="col-md-6 margin-top-8">
                                <div class="input-group">
                                    <span class="input-group-addon2" id="">金额(元)</span>
                                    <div id="divtotal">
                                    </div>
                                </div>
                            </div>

                            <div class="col-md-6 margin-top-8">
                                <div class="input-group">
                                    <span class="input-group-addon2" id="">审批日期</span>
                                    <div id="divdate">
                                    </div>
                                </div>
                            </div>

                        </div>

                        <div class="row">
                            <div class="col-md-12 margin-top-8">
                                <div class="input-group">
                                    <span class="input-group-addon2" id="">备注</span>
                                    <div id="divremark">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--<div class="row" style="margin-top:10px;">
                        <div class="col-md-2 col-md-offset-10 margin-top-8">
                            <button class="btn btn-primary pull-right" id="submitbtn">Submit</button>
                        </div>
                    </div>-->
                    </div>


                    <div class="modal-header" style="margin-top:10px;padding-left:0px;">
                        <h4 class="modal-title" id="myModalLabel">报销明细</h4>
                        <!--<button class="btn btn-primary" type="button" onclick="addrow()" name="toggle" aria-label="toggle" title=""> 添加 </button>-->
                        <!--<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>-->
                    </div>
                    <div class="panel-body">
                        <div class="row">
                            <style>
                                .fixed-table-container thead th {
                                    border-bottom: 1px solid #ddd;
                                }

                                .table {
                                    margin-bottom: 0 !important;
                                    border-bottom: 1px solid #ddd !important;
                                    border-collapse: collapse !important;
                                    border-radius: 1px !important;
                                }
                            </style>
                            <div class="fixed-table-container" style="padding-bottom: 0px;width:97%;margin-left:9px;">
                                <div class="fixed-table-header" style="display: none;">
                                    <table></table>
                                </div>
                                <div class="fixed-table-body">
                                    <div class="fixed-table-loading" style="top: 41px;">
                                        Loading, please wait...
                                    </div>
                                    <table id="table" class="table table-hover">
                                        <thead>
                                            <tr>
                                                <th style="" data-field="vac_person">
                                                    <div class="th-inner">
                                                        类别
                                                    </div>
                                                    <div class="fht-cell"></div>
                                                </th>
                                                <th style="" data-field="vac_type">
                                                    <div class="th-inner">
                                                        金额
                                                    </div>
                                                    <div class="fht-cell"></div>
                                                </th>
                                                <th style="" data-field="vac_interval">
                                                    <div class="th-inner">
                                                        说明
                                                    </div>
                                                    <div class="fht-cell"></div>
                                                </th>
                                                <!--<th style="" data-field="vac_interval">
                                                <div class="th-inner">
                                                    操作
                                                </div>
                                                <div class="fht-cell"></div>
                                            </th>-->
                                            </tr>
                                        </thead>
                                        <tbody id="expense_items">
                                            <tr data-index="0">
                                                <td style="">
                                                    <select class="selectpicker" name="expense_type" data-style="btn-info">
                                                        <option value="交通费">交通费</option>
                                                        <option value="住宿费">住宿费</option>
                                                        <option value="其他">其他</option>
                                                    </select>
                                                </td>
                                                <td style=""><input type="text" id="" name="txt_price" class="form-control" placeholder="请输入" onkeyup="value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')" onblur="value = value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g, '');calctotalprice()" aria-describedby="basic-addon1"></td>
                                                <td style="">
                                                    <input type="text" id="" name="txt_description" class="form-control" placeholder="请输入" aria-describedby="basic-addon1">
                                                </td>
                                                <td style="">
                                                    <button type="button" onclick="delrow(this)" class="close" style="color:red;cursor:pointer;">×</button>
                                                </td>
                                            </tr>
                                            <tr data-index="0">
                                                <td style="">
                                                    <select class="selectpicker" name="expense_type" data-style="btn-info">
                                                        <option value="交通费">交通费</option>
                                                        <option selected="selected" value="住宿费">住宿费</option>
                                                        <option value="其他">其他</option>
                                                    </select>
                                                </td>
                                                <td style=""><input type="text" id="" name="txt_price" class="form-control" placeholder="请输入" onkeyup="value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')" onblur="value = value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g, '');calctotalprice()" aria-describedby="basic-addon1"></td>
                                                <td style="">
                                                    <input type="text" id="" name="txt_description" class="form-control" placeholder="请输入" aria-describedby="basic-addon1">
                                                </td>
                                                <td style="">
                                                    <button type="button" onclick="delrow(this)" class="close" style="color:red;cursor:pointer;">×</button>
                                                </td>
                                            </tr>
                                            <tr data-index="0">
                                                <td style="">
                                                    <select class="selectpicker" name="expense_type" data-style="btn-info">
                                                        <option value="交通费">交通费</option>
                                                        <option value="住宿费">住宿费</option>
                                                        <option selected="selected" value="其他">其他</option>
                                                    </select>
                                                </td>
                                                <td style=""><input type="text" id="" name="txt_price" class="form-control" placeholder="请输入" onkeyup="value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')" onblur="value = value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g, '');calctotalprice()" aria-describedby="basic-addon1"></td>
                                                <td style="">
                                                    <input type="text" id="" name="txt_description" class="form-control" placeholder="请输入" aria-describedby="basic-addon1">
                                                </td>
                                                <td style="">
                                                    <button type="button" onclick="delrow(this)" class="close" style="color:red;cursor:pointer;">×</button>
                                                </td>
                                            </tr>

                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>

                        <div class="row" style="margin-top:8px;">
                            <div class="col-md-12 margin-top-8" style="padding: 0px;padding-left: 9px;padding-right: 12px;">
                                <div class="input-group">
                                    <span class="input-group-addon" id="">审批意见</span>
                                    <input type="text" id="txt_commons" class="form-control" name="txt_commons" placeholder="" aria-describedby="basic-addon1">
                                </div>
                            </div>

                        </div>

                    </div>
                    <div class="modal-footer" style="border:0px;">
                        <!--<button type="button" class="btn btn-default" data-dismiss="modal"> 取消 </button>-->
                        <button type="button" class="btn btn-primary" style="background-color:#ff7c22;border-color:#ff7c22;" id="rejectbtn" onclick="submitstatus(2)"> 驳回 </button>
                        <button type="button" class="btn btn-primary" onclick="submitstatus(1)" id="submitbtn"> 批准 </button>
                    </div>
                </div>


            </div>
        </div>
    </div>
</div>
{% endblock %}

{% block scripts %}
<script src="/static/lxoa/js/bootstrap.min.js"></script>
<script src="/static/lxoa/js/bootstrap-table.min.js"></script>
<!--<script src="/static/lxoa/js/bootstrap-table-locale-all.min.js"></script>-->

<script src="/static/lxoa/laydate/laydate.js"></script>
<script src="/static/lxoa/js/tableapprove.js"></script>
<script src="/static/lxoa/js/echarts.min.js"></script>

{% endblock %}
